package com.example.mskefu.controller;

import com.example.mskefu.entity.Message;
import com.example.mskefu.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

@RestController
public class MessageController {
    @Autowired
    private MessageService messageService;

    @GetMapping("/KeFu/getMessagesByfszId/{fszId}/{jszId}/{shopId}")
    public ArrayList<Message> getMessageByChatId(@PathVariable("fszId") String fszId, @PathVariable("jszId") String jszId,@PathVariable("shopId") String shopId)
    {
        return messageService.getMessageByChatId(fszId, jszId, shopId);
    }

}
